//发布博客
import request from "@/utils/request.js";

// 发布博客
export const addBlog = (params) => {
  return request.post("/blog/add/", params);
};

// 获取热门博客
export const getHotBlog = (params) => {
  return request.get("/blog/blogHot/", { params });
};

// 获取个人所发布的博客
export const getAllBlog = (params) => {
  return request.post("/blog/bloglist/", params);
};

// 获取所有用户发布的博客
export const getAllUserBlog = (params) => {
  return request.post("/blog/Allbloglist/", params);
};
// 获取用户已经删除的博客
export const getBlogDelList = (params) => {
  return request.post("/blog/GetBlogDelList/", params);
};

// 获取博客详情
export const getBlogDetail = (params) => {
  return request.get("/blog/detail/", { params });
};

// 更新博客
export const updateBlog = (params) => {
  return request.post("/blog/update/", params);
};

// 删除博客
export const delBlog = (params) => {
  return request.post("/blog/delete/", params);
};

// 永久删除
export const trueDeleteBlog = (params) => {
  return request.post("/blog/trueDelete/", params);
};

// 置顶博客
export const topBlog = (params) => {
  return request.post("/blog/top/", params);
};

// 查询博客
export const searchBlog = (params) => {
  return request.post("/blog/search/", params);
};

// 上传博客内容图片
export const uploadContentImage = () => {
  return request.post("/blog/uploadBlogContentImg/", params);
};
